package com.gzhuxj201.mapper;

import com.gzhuxj201.entity.SC;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface SCMapper {
    @Select("select cno from sc where sno=#{sno}")
    List<String> selectBySno(String sno);

    @Delete("delete from sc where cno=#{cno}")
    int deleteByCno(String cno);

    @Select("select * from sc where sno=#{sno} and cno=#{cno}")
    SC selectBySnoAndCno(String sno, String cno);

    @Insert("insert into sc(sno,cno) values(#{sno},#{cno})")
    int add(SC sc);

    @Delete("delete from sc where sno=#{sno} and cno=#{cno}")
    int deleteBySnoAndCno(SC sc);

}
